package cn.iocoder.yudao.module.dlbz.dal.mysql.companypayrecord;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dlbz.dal.dataobject.companypayrecord.CompanyPayRecordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dlbz.controller.admin.companypayrecord.vo.*;

/**
 * 企业支付记录 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CompanyPayRecordMapper extends BaseMapperX<CompanyPayRecordDO> {

    default PageResult<CompanyPayRecordDO> selectPage(CompanyPayRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CompanyPayRecordDO>()
                .eqIfPresent(CompanyPayRecordDO::getCompanyId, reqVO.getCompanyId())
                .eqIfPresent(CompanyPayRecordDO::getMoney, reqVO.getMoney())
                .eqIfPresent(CompanyPayRecordDO::getImg, reqVO.getImg())
                .eqIfPresent(CompanyPayRecordDO::getState, reqVO.getState())
                .betweenIfPresent(CompanyPayRecordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CompanyPayRecordDO::getId));
    }

}